﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Hotel.BLL;

namespace Hotel
{
    public partial class Form1 : Form
    {
        InternetService iservice = new InternetService();
        HJScrawler hjScrawler = new HJScrawler();
        private string startString = "Getting link.....";
        private string numOfLink = "Number of link getted: ";
        private string getData = "Getting Data from link....";
        private string gettedData = "Done...";
        public Form1()
        {
            InitializeComponent();

        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            lblUrl.Text = startString;
            string from = txtFrom.Text;
            string to = txtTo.Text;
            
            int i = hjScrawler.GetJobUrls(int.Parse(from), int.Parse(to));
            lblUrl.Text = numOfLink + i;

            lblGetData.Text = getData;
            hjScrawler.GetJobDetail();
            lblGetData.Text = gettedData;

        }
    }
}
